<!DOCTYPE html>
<pre>
<html>
 <head>
 <style>
table, td, th
{
border:1px solid green;
}

 </style>
  <script src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false&libraries=places"></script>
	
<script>
	var origin1 = new google.maps.LatLng(55.930385, -3.118425);
  var origin2 = "London, England";	
	var destinationA = "Stockholm, Sweden";
	var destinationB = new google.maps.LatLng(51.4791, 0);
//	var destinationB = "(51.4791,1)";
	var destinationC = "Bletchley, England";
	var service = new google.maps.DistanceMatrixService();

service.getDistanceMatrix(
  {
    origins: [origin2,origin1],
    destinations: [new google.maps.LatLng(51.4791, 0),"Stockholm, Sweden"],
    travelMode: google.maps.TravelMode.DRIVING
	 }, callback);

function callback(response, status) {
 if (status == google.maps.DistanceMatrixStatus.OK) {
  var outtable = '<table><tr><th></th>';
  document.getElementById('ans2').innerHTML = JSON.stringify(response,"*",1);
  for (var c=0;c< response.originAddresses.length;c++) {
	 outtable = outtable + '<th>' + response.originAddresses[c] + '</th>'
	}

  for (var r=0;r <response.destinationAddresses.length;r++) {
	  var destname = response.destinationAddresses[r] ;
	  outtable = outtable + '<tr><th>' + destname + '</th>'
			
    for (var c=0;c< response.originAddresses.length;c++) {
		 destitem = response.rows[c];
     outtable = outtable + '<td>' + destitem.elements[r].distance.text + '</td>'
  	}
		
	  outtable = outtable + '</tr>'
	}
	
  outtable = outtable + '</tr>';
  outtable = outtable + '</table>';
  document.getElementById('ans').innerHTML = outtable;

 }
 
}
</script>
</head>
<body>

<div id=ans>
</div>
<div id=ans2>
</div>
</body>
</html>